package day12.demo1;

/**
 * @Auther:小陈的Java
 */
public class ThreadDemo4 extends Thread{
    public static void main(String[] args) throws Exception{
        ThreadDemo4 threadDemo4 = new ThreadDemo4();
        threadDemo4.start();//
        Thread.sleep(1000);
        threadDemo4.setTag();
    }
    private boolean tag = true;

    public void setTag() {
        this.tag = false;
    }

    @Override
    public void run() {
        while (tag)
        System.out.println("子线程运行中");
    }
}
